
// import oimo.m.Vec3;
// import oimo.m.M;
// import oimo.dynamics.constraint.contact.ContactImpulse;

import { Vec3 } from "../../../common/Vec3";

/**
 * numberernal class.
 */
export class ContactImpulse {
	// normal impulse
	impulseN: number;

	// tangent impulse
	impulseT: number;

	// binomal impulse
	impulseB: number;

	// position impulse
	impulseP: number;

	// lateral impulse
	impulseL: Vec3;

	constructor() {
		this.clear();
	}


	public clear(): void {
		this.impulseN = 0;
		this.impulseT = 0;
		this.impulseB = 0;
		this.impulseP = 0;
		this.impulseL = new Vec3();
	}

	public copyFrom(imp: ContactImpulse): void {
		this.impulseN = imp.impulseN;
		this.impulseT = imp.impulseT;
		this.impulseB = imp.impulseB;
		this.impulseL.copyFrom(imp.impulseL);
	}

}
